package com.platform.modules.sys.service.impl;


import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.platform.modules.mail.service.MailService;
import com.platform.modules.sys.dao.SysWeChatMessageDao;
import com.platform.modules.sys.entity.SysWeChatMessageEntity;
import com.platform.modules.sys.service.SysDictService;
import com.platform.modules.sys.service.SysOrgService;
import com.platform.modules.sys.service.SysOrgUserService;
import com.platform.modules.sys.service.SysRoleService;
import com.platform.modules.sys.service.SysUserRoleService;
import com.platform.modules.sys.service.SysWeChatMessageService;

/**
 * @author wangLc
 */
@Service("sysWeChatMessageService")
public class SysWeChatMessageServiceImpl extends ServiceImpl<SysWeChatMessageDao, SysWeChatMessageEntity> implements SysWeChatMessageService {
    @Autowired
    private SysUserRoleService sysUserRoleService;
    @Autowired
    private SysRoleService sysRoleService;
    @Autowired
    private SysOrgUserService sysOrgUserService;
    @Autowired
    private MailService mailService;
    @Autowired
    private SysDictService sysDictService;
    @Autowired
    private SysOrgService sysOrgService;
    @Value("${spring.mail.emailTile}")
    private String emailTile;
    @Value("${spring.mail.emailParameter}")
    private String emailParameter;

    @Override
	@Transactional(rollbackFor = Exception.class)
	public void addWeChatMessage(SysWeChatMessageEntity SysWeChatMessageEntity) {
    	    SysWeChatMessageEntity.setSendTime(new Date());
    	    SysWeChatMessageEntity.setStemFrom("7");
    	    SysWeChatMessageEntity.setSendStatus("0");
    	    SysWeChatMessageEntity.setMessageNum("55555002");
		baseMapper.insert(SysWeChatMessageEntity);
	} 
    
    
    
    public List<SysWeChatMessageEntity> queryAll(Map<String, Object> params){
    	return baseMapper.queryAll(params);
    }
    
    
    
    
}
